#ifndef NOTESDIALOG_H
#define NOTESDIALOG_H

#include <QtGui/QDialog>
#include "ui_notesdialog.h"

/*!
 * Okienko edycji notatki
 */
class NotesDialog : public QDialog {
    Q_OBJECT

public:
    static QString getNoteText(QWidget *parent, const QString &title, const QString &caption, const QString &text=QString(), bool *ok=0);
    static void showNote(QWidget *parent, const QString &title, const QString text=QString());

private:
    enum Mode {Get, Show};

    Ui::NotesDialogClass ui;
    NotesDialog(QWidget *parent = 0, NotesDialog::Mode mode=Get);
    ~NotesDialog();


    inline void setCaption(const QString &caption) {ui.label->setText(caption); }
    inline void setText(const QString &text) { ui.plainTextEdit->setPlainText(text); }
    inline QString getText() { return ui.plainTextEdit->toPlainText(); }
};

#endif // NOTESDIALOG_H
